import {tracking} from "../Model/Tracking"
import { http } from './http'
import { AlertDialog } from "@kit.ArkUI"

interface tokenData {
  data: string,
  message: string,
  code: number
}
class Tracking{
  list:tracking[]=[]
  record(startTime:number,endTime:number,questionId:string){
    this.list.push({
      startTime,
      endTime,
      questionId
    })

  }
    report(){
console.log(JSON.stringify(this.list))
      return http.post<tokenData>("time/tracking",{
        timeList:this.list
      })
    this.list=[]

  }


}
export const trackingg=new Tracking()
